$(function(){
    $(document).on('click', '#submit-btn', function(){

        $('#output').removeClass('hide').html('执行中...');

        var form = new FormData(document.getElementById("test-dupp-form"));
        //             var req = new XMLHttpRequest();
        //             req.open("post", "${pageContext.request.contextPath}/public/testupload", false);
        //             req.send(form);
        $.ajax({
            url: $("#test-dupp-form").attr('action'),
            type:"post",
            data:form,
            processData:false,
            contentType: false,
            success:function(data){
                console.log(data);
                $('#output').removeClass('hide').html('接口返回：\n'+data);
            },
            error:function(e){
                alert("错误！！");
            }
        });
    })
});

$(function(){
});